# Contributor: Díaz Urbaneja Diego <sodomon2@gmail.com>
# Maintainer: Díaz Urbaneja Diego <sodomon2@gmail.com>
pkgname=simplescreenrecorder
pkgver=0.4.4
pkgrel=2
pkgdesc="Screen recorder for Linux"
url="https://www.maartenbaert.be/simplescreenrecorder/"
arch="x86_64 x86" #disabled for the other architectures due to compiling problems
license="GPL-3.0-only"
makedepends="
	alsa-lib-dev
	cmake
	ffmpeg-dev
	glu-dev
	jack-dev
	libx11-dev
	libxext-dev
	libxfixes-dev
	libxi-dev
	libxinerama-dev
	make
	mesa-dev
	pkgconfig
	pulseaudio-dev
	qt5-qtbase-dev
	qt5-qttools-dev
	qt5-qtx11extras-dev
	samurai
	v4l-utils-dev
"
subpackages="$pkgname-doc"
options="!check" # make check not implemented
source="$pkgname-$pkgver.tar.gz::https://github.com/MaartenBaert/ssr/archive/$pkgver.tar.gz
	ffmpeg5.patch
	"
builddir="$srcdir/ssr-$pkgver"

build() {
	cmake -G Ninja -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DWITH_QT5=on \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
a90549a2709490482d70559073e505e669417a93abf16124b98c021e6d2bf08b91b53eb68e006df4f80fcee9fe4da2624bf8de979618953adb3f37eb1d471525  simplescreenrecorder-0.4.4.tar.gz
5bba0ae2ff5932a2011c9fa7cff736a09409dc3b87e8e77ed7a7a2953e6c007e39d44649a176204e20277444dbab8c8f93e1e278069bf3e94d93b53c8cf1c1cf  ffmpeg5.patch
"
